#ifndef MYTCPSOCKET_H
#define MYTCPSOCKET_H
#include <QTcpSocket>
#include "protocol.h"
#include "msghandler.h"

class MyTcpSocket : public QTcpSocket
{
    Q_OBJECT
public:
    MyTcpSocket();
    ~MyTcpSocket();
    void recvMsg();
    void clientOffLine();
    QString m_strName;
    PDU* handlePDU(PDU* pdu);
    void writePDU(PDU* respdu);
    MsgHandler* m_pmh;
    QByteArray buffer;

signals://通知MyTcpServer移除socket的信号
    void OffLine(MyTcpSocket* mysocket);

};

#endif // MYTCPSOCKET_H
